﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};
	
	var auditData = Jxstar.findComboData('audit');
	var providertypeData = Jxstar.findComboData('providertype');
	var mgnstatusData = Jxstar.findComboData('mgnstatus');
	var items = [{
		height: '97%',
		width: '97%',
		border: false,
		layout: 'form',
		style: 'padding:10px;',
		items: [{
			anchor:'100%',
			border: false,
			layout:'column',
			border:true,
			xtype:'fieldset',
			title:'申请信息',
			collapsible:false,
			collapsed:false,
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'combo', fieldLabel:'记录状态', name:'provider__auditing', defaultval:'0',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: auditData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: auditData[0][0]},
					{xtype:'datefield', fieldLabel:'申请日期', name:'provider__record_date', defaultval:'fun_getToday()', format:'Y-m-d', anchor:'100%', readOnly:true},
					{xtype:'textfield', fieldLabel:'供应商编号', name:'provider__provider_code', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'供应商名称', name:'provider__provider_name', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'供应商简称', name:'provider__provider_simple', anchor:'100%', maxLength:50},
					{xtype:'combo', fieldLabel:'供应商类型', name:'provider__provider_type',
						anchor:'100%', editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: providertypeData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: providertypeData[0][0]},
					{xtype:'textfield', fieldLabel:'供货类别', name:'provider__supply_type', anchor:'100%', maxLength:50}
				]
			},{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textfield', fieldLabel:'申请人', name:'provider__record_user', defaultval:'fun_getUserName()', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'申请部门', name:'provider__dept_name', defaultval:'fun_getDeptName()', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'combo', fieldLabel:'管理状态', name:'provider__manage_status', defaultval:'20',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: mgnstatusData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: mgnstatusData[0][0]},
					{xtype:'textarea', fieldLabel:'申请原因', name:'provider__apply_memo', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', width:'100%', height:96, maxLength:200}
				]
			}
			]
		},{
			anchor:'100%',
			border: false,
			layout:'column',
			border:true,
			xtype:'fieldset',
			title:'基本信息',
			collapsible:false,
			collapsed:false,
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'numberfield', decimalPrecision:2, fieldLabel:'年营业额(万元)', name:'provider__year_turnover', anchor:'100%', maxLength:12},
					{xtype:'textfield', fieldLabel:'传真号码', name:'provider__faxnumber', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'详细地址', name:'provider__address', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'开户银行', name:'provider__bank_name', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'银行帐号', name:'provider__bank_account', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'经营性质', name:'provider__naturebus', anchor:'100%', maxLength:10},
					{xtype:'textfield', fieldLabel:'法人代表', name:'provider__legal_person', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'法人代表电话', name:'provider__legal_phone', anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'业务代表', name:'provider__business_rep', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'业务代表电话', name:'provider__rep_phone', anchor:'100%', maxLength:20},
					{xtype:'hidden', fieldLabel:'主键', name:'provider__provider_id', anchor:'100%'}
				]
			},{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'numberfield', decimalPrecision:2, fieldLabel:'注册资金(万元)', name:'provider__reg_money', anchor:'100%', maxLength:12},
					{xtype:'textfield', fieldLabel:'电话号码', name:'provider__provider_phone', anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'邮政编码', name:'provider__post_code', anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'执照注册号', name:'provider__license_reg', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'税号', name:'provider__hs_codes', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'资金承受能力', name:'provider__money_ability', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'员工人数', name:'provider__person_num', anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'技术人员人数', name:'provider__tech_num', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'会员证号', name:'provider__mcard_code', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'会员证', name:'provider__menber_card', anchor:'100%', maxLength:50},
					{xtype:'hidden', fieldLabel:'登记部门ID', name:'provider__dept_id', defaultval:'fun_getDeptId()', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'登记人id', name:'provider__record_id', defaultval:'fun_getUserId()', anchor:'100%'}
				]
			}
			]
		},{
			anchor:'100%',
			border: false,
			layout:'column',
			border:true,
			xtype:'fieldset',
			title:'供应商状况',
			collapsible:false,
			collapsed:false,
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textarea', fieldLabel:'企业概况', name:'provider__company_profile', width:'100%', height:72, maxLength:200},
					{xtype:'textarea', fieldLabel:'企业主要设备状况', name:'provider__dev_profile', width:'100%', height:72, maxLength:200},
					{xtype:'textarea', fieldLabel:'质量承诺', name:'provider__zlcl', width:'100%', height:72, maxLength:200}
				]
			},{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textarea', fieldLabel:'经营范围', name:'provider__run_range', width:'100%', height:72, maxLength:200},
					{xtype:'textarea', fieldLabel:'经营状况', name:'provider__run_profile', width:'100%', height:72, maxLength:200},
					{xtype:'textarea', fieldLabel:'备注', name:'provider__remarks', width:'100%', height:72, maxLength:200}
				]
			}
			]
		}]
	}];
	
	config.param = {
		items: items,
		funid: 'provider_app'
	};

	
	
	return new Jxstar.FormNode(config);
}